<?php
    class ratedb{
        function getXML($source = '')
        {
    		return file_get_contents($source);
    	}
    	
        function getRate($mydate = '', $source = '')
        {
    		$xmlData = NULL;
    		$p = xml_parser_create();
    		xml_parse_into_struct($p,$this->getXML($source) , $xmlData);
    		xml_parser_free($p);
    		$mydate = $xmlData['1']['value'];
    		$data = array();
    		if($xmlData)
    		{
    			foreach($xmlData as $v)
    				if(isset($v['attributes']))
    				{
    					$data[] = $v['attributes'];
    				}
    			return $data;
    		}
    		return false;
    	}
    }
?>